﻿using System;

namespace Includes
{
    /// <summary>
    /// Contains Vitals
    /// blood; The bloodpreasure of the patient in mmHg
    /// pule; The pulse of the patient in BpM
    /// weight; The weight of the patient in Kg
    /// </summary>
    public struct Vitals
    {
        /// <summary> The bloodpreasure of the patient in mmHg </summary>
        public int blood { set; get; }
        /// <summary> The pulse of the patient in BpM </summary>
        public int pulse { set; get; }
        /// <summary> The weight of the patient in Kg </summary>
        public int weight { set; get; }
    }

    /// <summary>
    /// Contains flags
    /// kr; The patient has been informed, and is expected in the hospital
    /// rd; The lastly submitted vital data had derivations
    /// info; The patient has been informed, that his/her vitaldata has not yet been submitted
    /// </summary>
    public struct Flags
    {
        /// <summary> The patient has been informed, and is expected in the hospital </summary>
        public bool kr { set; get; }
        /// <summary> The lastly submitted vital data had derivations </summary>
        public bool rd { set; get; }
        /// <summary> The patient has been informed, that his/her vitaldata has not yet been submitted </summary>
        public bool info { set; get; }
    }

    /// <summary>
    /// Contains information needed to handle an SMS
    /// ID ; Numerical value to identify the SMS, at one point only one with a given ID can exist
    /// receipientNumber; Number of the receipient in the form +ccrrrn*
    /// senderNumber; Number the sms originates from (spoofed) 
    /// text; The text to send
    /// </summary>
    public struct SMS
    {
        /// <summary> Numerical value to identify the SMS, at one point only one with a given ID can exist </summary>
        public int ID { set; get; }
        /// <summary> Number of the receipient in the form +ccrrrn* </summary>
        public String receipientNumber { set; get; }
        /// <summary> Number the sms originates from (spoofed) </summary>
        public String senderNumber { set; get; }
        /// <summary> The text to send </summary>
        public String text { set; get; }
    }

    /// <summary>
    /// Contains information needed to make a voice call
    /// receipientNumber; Number of the receipient in the form +ccrrrn*
    /// patientName; Name of the patient, might be used to texttospeech the name 
    /// senderNumber; Number the call originates from (spoofed) 
    /// fileID; Audio file containing the message to read
    /// alternative; Text that is processed by the Text-to-Speech in case opening the file fails
    /// </summary>
    public struct VoiceCall
    {
        /// <summary> Number of the receipient in the form +ccrrrn* </summary>
        public String receipientNumber { set; get; }
        /// <summary> Name of the patient, might be used to texttospeech the name  </summary>
        public String patientName { set; get; }
        /// <summary> Number the call originates from (spoofed) </summary>
        public String senderNumber { set; get; }
        /// <summary> Audio file containing the message to read </summary>
        public String fileID { set; get; }
        /// <summary> Text that is processed by the Text-to-Speech in case opening the file fails </summary>
        public String alternative { set; get; }
    }

    /// <summary>
    /// Contains patient information for evaluation
    /// normal*; Perfect value of * for patient
    /// critDer*; Critical derivation in % of *
    /// der*; acceptable derivation in % of
    /// </summary>
    public struct VitalData
    {
        /// <summary> Ideal value for patients bloodpressure </summary>
        public int normalBlood { set; get; }
        /// <summary> Critical deviation in % </summary>
        public float critDerBlood { set; get; }
        /// <summary> Acceptable deviation in % </summary>
        public float derBlood { set; get; }

        /// <summary> Ideal value for patients pulse </summary>
        public int normalPulse { set; get; }
        /// <summary> Critical deviation in % </summary>
        public float critDerPulse { set; get; }
        /// <summary> Acceptable deviation in % </summary>
        public float derPulse { set; get; }

        /// <summary> Ideal value for patients weight </summary>
        public int normalWeight { set; get; }
        /// <summary> Critical deviation in % </summary>
        public float critDerWeight { set; get; }
        /// <summary> Acceptable deviation in % </summary>
        public float derWeight { set; get; }
    }

    /// <summary>
    /// Contains infomation needed to make a voice call/send an sms
    /// name; Name of patient as it is to be said during the call
    /// number; Number to call/send SMS to (can be the number of the patient, patients next of kin or emergency number depending on situation)
    /// </summary>
    public struct CallInfoSync
    {
        /// <summary> Patients name, as it should be read on the phone </summary>
        public String name { set; get; }
        /// <summary> Number to be called </summary>
        public String number { set; get; }
    }

    /// <summary>
    /// Contains infomation needed to make a voice call/send an sms
    /// name; Name of patient as it is to be said during the call
    /// action; Number to call/send SMS to (can be the number of the patient, patients next of kin or emergency number)
    /// </summary>
    public struct CallInfoAsync
    {
        /// <summary> Patients name, as it should be read on the phone </summary>
        public String name { set; get; }
        /// <summary> Which action should be taken after persisting the values </summary>
        public int action { set; get; }
    }

    /// <summary>
    /// Contains a vitaldataset for a patient
    /// bloodpressure; Blood pressure in mmHg
    /// pulse; Pulse in BMP
    /// weight; Weight in kg
    /// time; Timestamp at which those values were submitted
    /// </summary>
    public struct VData
    {
       /// <summary> Blood pressure in mmHg </summary>
       public int bloodpressure { set; get; }
       /// <summary> Pulse in BMP </summary>
       public int pulse { set; get; }
       /// <summary> Weight in kg </summary>
       public int weight { set; get; }
       /// <summary> Timestamp at which those values were submitted </summary>
       public DateTime time { set; get; }
    }

    /// <summary>
    /// Gender of the patient
    /// </summary>
    public enum Gender
    {
        /// <summary> No gender assigned </summary>
        Keins,
        /// <summary> Female </summary>
        Weiblich,
        /// <summary> Male </summary>
        Männlich
    }

    /// <summary>
    /// Status of the patient
    /// </summary>
    public enum Status
    {
        /// <summary> No status assigned </summary>
        Keiner,
        /// <summary> Active </summary>
        Aktiv,
        /// <summary> Inactive </summary>
        Inaktiv
    }
}